output Profile Mode
What a PDF export does with the document's Output profile of outputColorSpace. OutputProfileMode.OFF writes the colors as they are. OutputProfileMode.CONVERT converts every solid color into the Output profile: fills, strokes, text and the alternate of each spot color. OutputProfileMode.ASSIGN keeps the values of every solid color in the space of the Output profile. Those are CMYK colors in a CMYK output and RGB colors in an RGB output. It converts the other colors as OutputProfileMode.CONVERT does. With embedProfiles, the Output profile in the file labels the kept values. Without it, they stay device values, as the converted values of OutputProfileMode.CONVERT do. A spot color's alternate is its CMYK approximation when it has one, else its RGB approximation, and it converts unless OutputProfileMode.ASSIGN keeps it. When a color converts, an RGB color converts from sRGB. A CMYK color converts from the document CMYK profile with the document's rendering intent. A CMYK to CMYK conversion keeps a K-only value on the K plate. An Absolute Colorimetric intent converts as Relative Colorimetric there. An Output profile without a K-only link, such as an input-class profile, converts with the document's intent instead, and Absolute Colorimetric as Relative Colorimetric. A K-only value can then print with four inks, and the engine log warns. The same profile on both sides passes CMYK values through unchanged. With RGB output, a CMYK color goes through sRGB on its way to the Output profile. A gradient that the export keeps as a vector converts its stops as well. The export waits for an Output profile that is still loading. It fails with EngineErrorCode.COLOR_OUTPUT_PROFILE_NOT_SET when the slot is empty, and with EngineErrorCode.COLOR_PROFILE_MISSING when the profile does not load. It fails with EngineErrorCode.COLOR_OUTPUT_PROFILE_NOT_CONVERTIBLE when the profile has no table into its space. A profile that SceneApi.setDocumentColorProfile is still assigning is not in the slot yet, so await that call first. When the document names a CMYK profile that does not load, the bundled fallback stands in, with a warning in the log. Images convert too. With exportPdfWithHighCompatibility off, a JPEG, PNG or WebP image converts from its own profile at its native size, also above the maxImageSize setting. An image that does not fit in memory at that size fails the export with EngineErrorCode.ENCODE_INSUFFICIENT_RESOURCES. When the engine cannot use the profile of an image, such as a lookup-table profile, it decodes the image to sRGB and converts from there. A CMYK JPEG whose EXIF orientation is not up converts from its RGB decode at the capped size. Its K-only black becomes a four-ink black. A JPEG keeps its original bytes when its profile is the Output profile and its EXIF orientation is up. An untagged CMYK JPEG has the document CMYK profile, and a CMYK JPEG also needs the Adobe marker. An untagged RGB JPEG counts as sRGB and always converts. With exportPdfWithHighCompatibility off, a gray image without alpha stays DeviceGray. When the export must decode a CMYK JPEG and cannot, as with a side above 20000 pixels, it fails with EngineErrorCode.COLOR_IMAGE_DECODE_FAILED. An image that does not convert fails it with EngineErrorCode.COLOR_IMAGE_NOT_CONVERTIBLE. Effects, blurs, brush strokes and an image with an imported definition convert from RGB, so a K-only black in them becomes a four-ink black. With exportPdfWithHighCompatibility off, OutputProfileMode.ASSIGN keeps the samples of a JPEG, PNG or WebP image in the space of the Output profile. In a CMYK output, such an image is DeviceCMYK, and an upright CMYK JPEG with the Adobe marker keeps its bytes. In an RGB output, such an image keeps its samples, and so does each raster layer. With embedProfiles, the Output profile labels them, else they stay untagged. Images in the other space convert, and so does a CMYK JPEG whose EXIF orientation is not up. With OutputProfileMode.CONVERT, a PNG or JPEG export converts its pixels from the working space into the Output RGB profile. The working space is sRGB, or Display P3 with p3WorkingColorSpace. An 8-bit file stays within one level of an exact conversion. Alpha stays unchanged. Without embedProfiles, the file has no profile. With OutputProfileMode.ASSIGN, a PNG or JPEG export keeps the pixels of an OutputProfileMode.OFF export and holds the exact Output RGB profile, also without embedProfiles. A TGA, raw data or SVG export fails with EngineErrorCode.ENCODE_OUTPUT_PROFILE_UNSUPPORTED_FORMAT, and a color mask export with EngineErrorCode.ENCODE_COLOR_MASK_OUTPUT_PROFILE_UNSUPPORTED. With this option or embedProfiles, a PNG or JPEG export renders in one surface, which EditorApi.getMaxExportSize bounds. A profile that never answers fails the export with EngineErrorCode.COLOR_PROFILE_MISSING after the time that the setting exportPendingTimeoutSeconds allows. The default value is OutputProfileMode.OFF.